<?php
/**
 * Application information resource
 *
 * Sets information about the current project
 *
 * @category    IPB_CMS
 * @package     App_Application
 * @subpackage  Resource
 * @copyright   Copyright (c) 2009 IPB CMS <http://ipb-cms.googlecode.com/>
 * @license     http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License
 * @uses        Zend_Application_Resource_ResourceAbstract
 * @author      Henrique Moody <henriquemoody@gmail.com>
 */
class App_Application_Resource_Information extends Zend_Application_Resource_ResourceAbstract
{

    /**
     * Initialize resource
     *
     * Sets the project information
     *
     * @return mixed
     */
    public function init()
    {
        $options = $this->getOptions();
        $information = App_Information::getInstance();
        foreach ($options as $key => $value) {
            $methodName = 'set' . ucfirst($key);
            $refMethod = new ReflectionMethod('App_Information', $methodName);
            $refMethod->invoke($information, $value);
        }
    }

}
